#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
    int n = 0;
    int sum = 0;
    scanf("%d", &n);
    int big = 0;
    int small = 1;
    int tmp = 0;
    while (--n)
    {
        tmp = big;
        big += small;
        small = tmp;
    }
    sum = big + small;
    printf("%d", sum);
}